package net.versiforma.libraryreminder.emails;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Properties;

public class FailureEmail extends EmailMessage {

	public FailureEmail(Properties properties, String message) {
		super(properties);
		addressee = properties.getProperty("adminMail");
		subject = properties.getProperty("serviceName") + " failed";
		messageBody = message;
	}
	
	public FailureEmail(Properties properties, Throwable throwable) {
		this(properties, "");
		StringWriter sw = new StringWriter();
		throwable.printStackTrace(new PrintWriter(sw));
		messageBody = sw.toString();
	}
	
	
	

}
